home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
System Booster
/
System Booster.iso
/
SYS
/
s
/
Comment-Block.tked
< prev
next >
Wrap
Text File
|
1996-09-26
|
2KB
|
61 lines
/** -----------------------------------------------------------
** ARexx program to comment out a selected block
** -----------------------------------------------------------
** AREXX-Programm, um einen markierten Block auszukommentieren
** -----------------------------------------------------------
**
** © Tom Kroener '92
**
**/
options results
address 'TKEd.1' /* Portname of the first started TKEd */
Indent "OFF" /* No unwanted indents */
/* uncomment this for AREXX- or C- programs */
/*
scom = "/** "
mcom = " ** "
ecom = " **/"
*/
/* uncomment this for Modula2- or Oberon- programs */
scom = "(** "
mcom = " ** "
ecom = " **)"
/* uncomment this for Assembler- programs */
/*
scom = ";* "
mcom = ";* "
ecom = ";* "
*/
FirstMarkedLine /* Look for the start of the block */
Start = result
IF Start = -1 THEN
DO; Request1 "No block marked" /* Request and exit if nothing marked */
EXIT 10
END
GetLineNr /* Get number of the last marked line */
End = result-1 /* Cursor stands in the first unmarked
line */
UnmarkBlock
GotoLine Start
BeginOfLine
WriteString scom /* Write start of comment */
DO WHILE Start < END /* Write until end of block */
BeginOfLine
Cursor "DOWN" /* One line down */
WriteString mcom /* Write comment */
Start = Start + 1 /* Increment the counter for the lines */
END;
EndOfLine /* All lines commented out */
MakeReturn /* Insert a blank line for better looking */
WriteString ecom /* Write end of the comment */
EXIT 0 /* ciao */